/*
Date:20210509 14:10PM
key:不需要翻转链表都行，直接加
 */
class Solution {
public:
    int re(ListNode* head,vector<int>&v)
    {
        if(head->next!=NULL)
        {
            v.push_back(re(head->next,v));
            return head->val;
        }
        else
        {
            return  head->val;
        }
    }
    vector<int> reversePrint(ListNode* head) 
    {
        vector<int>v;
        if(head==NULL){return v;}
        v.push_back(re(head,v));
        return v;
    }
};